<?php
/* @var $this VideoController */
/* @var $model Video */
/* @var $form CActiveForm */
?>

<div class="row-fluid">
    <div class="span12 box">
        <div class="box-header blue-background">
            <div class="title">
                <div class="icon-edit"></div>
                Form Video
            </div>
            <div class="actions">
                <a href="#" class="btn box-collapse btn-mini btn-link"><i></i>
                </a>
            </div>
        </div>
        <div class="box-content">
            <?php
            $form = $this->beginWidget('CActiveForm', array(
                'id' => 'video-form',
                // Please note: When you enable ajax validation, make sure the corresponding
                // controller action is handling ajax validation correctly.
                // There is a call to performAjaxValidation() commented in generated controller code.
                // See class documentation of CActiveForm for details on this.
                'enableAjaxValidation' => false,
                'htmlOptions' => array(
                    'class' => 'form form-horizontal',
            		'enctype' => 'multipart/form-data',
                )
            ));
            ?>
            <?php echo $form->errorSummary($model); ?>
            <div class="control-group">                    
                <?php echo $form->labelEx($model, 'name', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model, 'name', array('size' => 60, 'maxlength' => 255)); ?>
                    <?php echo $form->error($model, 'name'); ?>
                </div>
            </div>
            <div class="control-group">                    
                <?php echo $form->labelEx($model, 'url', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model, 'url', array('size' => 60, 'maxlength' => 500)); ?>
                    <?php echo $form->error($model, 'url'); ?>
                </div>
            </div>
            
            <div class="control-group">
                <?php echo $form->labelEx($model, 'description', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textArea($model, 'description', array('size' => 60, 'maxlength' => 500)); ?>
                    <?php echo $form->error($model, 'description'); ?>
                </div>
            </div>
            
            <!-- <hr class="hr-normal"> -->
            <div class="control-group">
                <?php echo $form->labelEx($model, 'content', array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textArea($model, 'content', array('id' => 'video_content', 'size' => 60, 'maxlength' => 5000)); ?>
                    <?php echo $form->error($model, 'content'); ?>
                </div>
            </div>
			
            <div class="form-actions">
                <button class="btn btn-primary" type="submit">
                   
                    <i class="icon-save"></i>
                    <?php echo $model->isNewRecord ? 'Create' : 'Save' ?>
                </button>
                <a href="<?php echo $this->createUrl('/video/admin'); ?>">
                	<button class="btn" type="button">Cancel</button>
                </a>
            </div>

            <?php $this->endWidget(); ?>
        </div>
    </div>
</div>

<script type="text/javascript">
<!--
CKEDITOR.replace('video_content',{
	toolbar : 'basic',
	enterMode : CKEDITOR.ENTER_BR,
	shiftEnterMode: CKEDITOR.ENTER_P
});
//-->
</script>

<div class="form">

<?php /*$form=$this->beginWidget('CActiveForm', array(
	'id'=>'video-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'description'); ?>
		<?php echo $form->textField($model,'description',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'description'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'content'); ?>
		<?php echo $form->textField($model,'content',array('size'=>60,'maxlength'=>5000)); ?>
		<?php echo $form->error($model,'content'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'url'); ?>
		<?php echo $form->textField($model,'url',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'url'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'active'); ?>
		<?php echo $form->textField($model,'active'); ?>
		<?php echo $form->error($model,'active'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'created_at'); ?>
		<?php echo $form->textField($model,'created_at'); ?>
		<?php echo $form->error($model,'created_at'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'updated_at'); ?>
		<?php echo $form->textField($model,'updated_at'); ?>
		<?php echo $form->error($model,'updated_at'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget();*/ ?>

</div><!-- form -->